package com.yvan.demo1;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;

public class SearchJarAction extends AnAction {

    public SearchJarAction() {
        super("ActionName");
    }

    @Override
    public void actionPerformed(AnActionEvent event) {
        Project project = event.getData(PlatformDataKeys.PROJECT);
        String txt = Messages.showInputDialog(
                project,
                "提示框",
                "标题栏",
                Messages.getQuestionIcon()
        );

        if (txt == null) {
            return;
        }

        Messages.showMessageDialog(
                project,
                "你好，" + txt,
                "提示",
                Messages.getInformationIcon()
        );
    }
}
